<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>新增长度单位</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      .box1 {
        width: 100px;
        height: 100px;
        background: gold;
      }
      /* vw： 视口的宽度
         vh： 视口的高度 */
      .box2 {
        width: 50vw;
        height: 20vh;
        background: deepskyblue;
      }
      /* 
      vmax：取宽度或者高度的最大值
      vmin：取宽度或者高度的最小值  */
      .box3 {
        width: 30vmax;
        height: 20vmin;
        background: orangered;
      }
    </style>
  </head>

  <body>
    <div class="box1">像素</div>
    <div class="box2">vw</div>
    <div class="box3">vmax</div>
  </body>
</html>
